kzs_surface_configuration.h File Reference

Configuration for drawable surfaces and windows. More...

Classes

struct  KzsSurfaceProperties
 Properties for a surface. More...
 
struct  kzsSurfaceConfigurationNativeFunctions
 

Macros

#define KZS_SURFACE_PROPERTY_DONT_CARE
 Indicates that the implementation can choose any value for a surface property. More...
 
#define KZS_SURFACE_TARGET_NATIVE_ANDROID
 Native android surface target. More...
 
#define KZS_SURFACE_TARGET_NATIVE_PIXMAP
 Native pixmap target. More...
 
#define KZS_SURFACE_TARGET_TEXTURE_2D
 Texture2D target. More...
 
#define KZS_SURFACE_ATTRIBUTE_WIDTH
 Width attribute. More...
 
#define KZS_SURFACE_ATTRIBUTE_HEIGHT
 Height attribute. More...
 
#define KZS_SURFACE_ATTRIBUTE_MATCH_FORMAT
 Match format (color format) attribute. More...
 
#define KZS_SURFACE_ATTRIBUTE_IMAGE_PRESERVED
 Is image preserved over frames. More...
 
#define KZS_SURFACE_ATTRIBUTE_NONE
 Ends the array specification. More...
 
#define KZS_SURFACE_ATTRIBUTE_FORMAT_RGBA_8888
 RGBA8888 format. More...
 
#define KZS_SURFACE_ATTRIBUTE_FORMAT_RGB_565
 RGB565 format. More...
 
#define KZS_SURFACE_ATTRIBUTE_TEXTURE_LEVEL
 Texture level. More...
 

Typedefs

typedef kzsError(* kzsSurfaceConfigurationGetSurfaceNativeFunctionsFunction) (const struct KzsSurfaceConfigurationNative *configurationNative, struct kzsSurfaceNativeFunctions *functions)
 
typedef kzsError(* kzsSurfaceConfigurationNativeCreateFunction) (const struct KzsDesktop *desktop, const struct KzsSurfaceProperties *surfaceProperties, struct KzsSurfaceConfigurationNative **out_configurationNative)
 Creates a native surface configuration. More...
 
typedef kzsError(* kzsSurfaceConfigurationNativeDestroyFunction) (struct KzsSurfaceConfigurationNative *configurationNative)
 Deletes a native surface configuration and frees all memory allocated for it. More...
 
typedef int(* kzsSurfaceConfigurationNativeGetPriorityFunction) (const struct KzsSurfaceConfigurationNative *configurationNative)
 Get priority. More...
 
typedef KzsSwapBehavior(* kzsSurfaceConfigurationNativeGetSwapBehavior) (const struct KzsSurfaceConfigurationNative *configurationNative)
 

Enumerations

enum  KzsSurfaceType {
  KZS_SURFACE_TYPE_DEFAULT, KZS_SURFACE_TYPE_VG_ONLY, KZS_SURFACE_TYPE_GLES_ONLY, KZS_SURFACE_TYPE_GL_ONLY,
  KZS_SURFACE_TYPE_VG_AND_GLES
}
 Graphics languages for a surface. More...
 
enum  KzsGraphicsContextAPI { KZS_GRAPHICS_CONTEXT_API_NONE, KZS_GRAPHICS_CONTEXT_API_WGL, KZS_GRAPHICS_CONTEXT_API_EGL, KZS_GRAPHICS_CONTEXT_API_GLX }
 Window system integration used by Kanzi. More...
 
enum  KzsSwapBehavior { KZS_SWAP_BEHAVIOR_DONT_CARE, KZS_SWAP_BEHAVIOR_COPY, KZS_SWAP_BEHAVIOR_EXCHANGE }
 

Functions

KANZI_API struct KzsSurfaceProperties kzsSurfaceGetDefaultProperties (void)
 Gets default properties for surface. More...
 
kzsError kzsSurfacePropertiesLog (const struct KzsSurfaceProperties *properties, kzString prefix)
 Logs the surface properties with info log level. More...
 
kzsError kzsSurfaceConfigurationCreate (const struct KzsDesktop *desktop, const struct KzsSurfaceProperties *surfaceProperties, struct KzsSurfaceConfiguration **out_configuration)
 Creates a configuration for surfaces for a windows. More...
 
kzsError kzsSurfaceConfigurationDestroy (struct KzsSurfaceConfiguration *configuration)
 Deletes a surface configuration and frees all memory allocated for it. More...
 
kzsError kzsSurfaceConfigurationGetSurfaceNativeFunctions (const struct KzsSurfaceConfiguration *configuration, struct kzsSurfaceNativeFunctions *functions)
 
enum KzsSurfaceType kzsSurfaceConfigurationGetSurfaceType (const struct KzsSurfaceConfiguration *configuration)
 
enum KzsGraphicsContextAPI kzsSurfaceConfigurationGetContextAPI (const struct KzsSurfaceConfiguration *configuration)
 
const struct KzsSurfaceConfigurationNative * kzsSurfaceConfigurationGetNative (const struct KzsSurfaceConfiguration *configuration)
 Gets native portion of a surface configuration. More...
 
KzsSwapBehavior kzsSurfaceConfigurationGetSwapBehavior (const struct KzsSurfaceConfiguration *configuration)
 
int kzsSurfaceConfigurationGetPriority (const struct KzsSurfaceConfiguration *configuration)
 Get priority. More...
 

Detailed Description

Configuration for drawable surfaces and windows.

Copyright 2008-2017 by Rightware. All rights reserved.

Macro Definition Documentation

#define KZS_SURFACE_PROPERTY_DONT_CARE

Indicates that the implementation can choose any value for a surface property.

#define KZS_SURFACE_TARGET_NATIVE_ANDROID

Native android surface target.

#define KZS_SURFACE_TARGET_NATIVE_PIXMAP

Native pixmap target.

#define KZS_SURFACE_TARGET_TEXTURE_2D

Texture2D target.

#define KZS_SURFACE_ATTRIBUTE_WIDTH

Width attribute.

#define KZS_SURFACE_ATTRIBUTE_HEIGHT

Height attribute.

#define KZS_SURFACE_ATTRIBUTE_MATCH_FORMAT

Match format (color format) attribute.

#define KZS_SURFACE_ATTRIBUTE_IMAGE_PRESERVED

Is image preserved over frames.

#define KZS_SURFACE_ATTRIBUTE_NONE

Ends the array specification.

#define KZS_SURFACE_ATTRIBUTE_FORMAT_RGBA_8888

RGBA8888 format.

#define KZS_SURFACE_ATTRIBUTE_FORMAT_RGB_565

RGB565 format.

#define KZS_SURFACE_ATTRIBUTE_TEXTURE_LEVEL

Texture level.

Typedef Documentation

typedef kzsError(* kzsSurfaceConfigurationGetSurfaceNativeFunctionsFunction) (const struct KzsSurfaceConfigurationNative *configurationNative, struct kzsSurfaceNativeFunctions *functions)
typedef kzsError(* kzsSurfaceConfigurationNativeCreateFunction) (const struct KzsDesktop *desktop, const struct KzsSurfaceProperties *surfaceProperties, struct KzsSurfaceConfigurationNative **out_configurationNative)

Creates a native surface configuration.

typedef kzsError(* kzsSurfaceConfigurationNativeDestroyFunction) (struct KzsSurfaceConfigurationNative *configurationNative)

Deletes a native surface configuration and frees all memory allocated for it.

typedef int(* kzsSurfaceConfigurationNativeGetPriorityFunction) (const struct KzsSurfaceConfigurationNative *configurationNative)

Get priority.

typedef KzsSwapBehavior(* kzsSurfaceConfigurationNativeGetSwapBehavior) (const struct KzsSurfaceConfigurationNative *configurationNative)

Enumeration Type Documentation

Graphics languages for a surface.

Enumerator
KZS_SURFACE_TYPE_DEFAULT 

Surface rendering API is unspecified.

KZS_SURFACE_TYPE_VG_ONLY 

Surface is target for OpenVG rendering.

KZS_SURFACE_TYPE_GLES_ONLY 

Surface is target for OpenGLES rendering.

KZS_SURFACE_TYPE_GL_ONLY 

Surface is target for OpenGL rendering.

KZS_SURFACE_TYPE_VG_AND_GLES 

Reserved for future use.

Window system integration used by Kanzi.

Enumerator
KZS_GRAPHICS_CONTEXT_API_NONE 

No graphics context API.

KZS_GRAPHICS_CONTEXT_API_WGL 

Use WGL for graphics context.

KZS_GRAPHICS_CONTEXT_API_EGL 

Use EGL for graphics context.

KZS_GRAPHICS_CONTEXT_API_GLX 

Use GLX for graphics context.

Enumerator
KZS_SWAP_BEHAVIOR_DONT_CARE 

Buffer contents become undefined on swap.

If whole screen is not redrawn each frame, there may be unexpected content.

KZS_SWAP_BEHAVIOR_COPY 

Buffer contents are preserved on swap.

KZS_SWAP_BEHAVIOR_EXCHANGE 

Older buffer is recycled on swap.

Function Documentation

KANZI_API struct KzsSurfaceProperties kzsSurfaceGetDefaultProperties ( void  )

Gets default properties for surface.

kzsError kzsSurfacePropertiesLog ( const struct KzsSurfaceProperties properties,
kzString  prefix 
)

Logs the surface properties with info log level.

kzsError kzsSurfaceConfigurationCreate ( const struct KzsDesktop desktop,
const struct KzsSurfaceProperties surfaceProperties,
struct KzsSurfaceConfiguration **  out_configuration 
)

Creates a configuration for surfaces for a windows.

kzsError kzsSurfaceConfigurationDestroy ( struct KzsSurfaceConfiguration configuration)

Deletes a surface configuration and frees all memory allocated for it.

kzsError kzsSurfaceConfigurationGetSurfaceNativeFunctions ( const struct KzsSurfaceConfiguration configuration,
struct kzsSurfaceNativeFunctions functions 
)
enum KzsSurfaceType kzsSurfaceConfigurationGetSurfaceType ( const struct KzsSurfaceConfiguration configuration)
enum KzsGraphicsContextAPI kzsSurfaceConfigurationGetContextAPI ( const struct KzsSurfaceConfiguration configuration)
const struct KzsSurfaceConfigurationNative* kzsSurfaceConfigurationGetNative ( const struct KzsSurfaceConfiguration configuration)

Gets native portion of a surface configuration.

KzsSwapBehavior kzsSurfaceConfigurationGetSwapBehavior ( const struct KzsSurfaceConfiguration configuration)
int kzsSurfaceConfigurationGetPriority ( const struct KzsSurfaceConfiguration configuration)

Get priority.